<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .con {
            width: 600px;
            height: 400px;
            border: 1px solid red;
            display: flex;

        }

        .con .con-1 {
            margin: 10px;
            border: 1px solid blue;
            width: 220px;
            height: 133px;
            overflow: hidden;
            position: relative;
        }

        .con .con-1 img,
        .con .con-1 .con-text {
            position: absolute;
            top: 0;
            left: 0;
        }

        .con .con-1 .con-text {
            z-index: 2;
            background: rgba(0, 0, 0, 0.5);
            /* width: 220px;
            height: 133px; */
            width: 100%;
            height: 100%;
            color: #fff;
            opacity: 0;
            transition: 1s;
        }

        .con .con-1:hover .con-text {
            opacity: 1;
        }

        .con .con-1 img {
            transition: 1s;
        }

        .con .con-1:hover img {
            transform: skewX(-20deg) scale(1.2);
        }

        .con .con-w {
            width: 332px;
        }

        /* 文字层展示出来后显示放大镜 */
        .con .con-1 .con-text div {
            width: 32px;
            height: 34px;
            background: url(./img/zoomico.png) no-repeat;
            margin: 40px auto;
            transition: 1s;
        }

        .con .con-1 .con-text div:hover {
            background-position: 0 -34px;
        }
    </style>
</head>

<body>
    <div class="con">
        <div class="con-1">
            <img src="./img/worksimg1.jpg" alt="">
            <div class="con-text">
                <span>测试文字11111</span>
                <div></div>
            </div>
        </div>
        <div class="con-1 con-w">
            <img src="./img/worksimg4.jpg" alt="">
            <div class="con-text">
                <span>测试文字2222</span>
                <div></div>
            </div>
        </div>
    </div>
</body>

</html>